<form id="pagerForm" method="post" action="#rel#">
	<input type="hidden" name="pageNum" value="<?php echo $pageNum ?>" />
	<input type="hidden" name="numPerPage" value="<?php echo $limit ?>" />
	<input type="hidden" name="orderField" value="<?php echo $field ?>" />
	<input type="hidden" name="orderDirection" value="<?php echo $order_by ?>" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return dwzSearch(this, 'dialog');" action="<?php echo site_url('backend/warehouse/addAgent'); ?>" method="post">
		<div class="searchBar">
			<ul class="searchContent">
				<li>
					<label>地区名：</label>
					<input type="text" name="address" value="<?php echo $this->input->post('address') ?>"/>
				</li>
				<li>
					<select class="combox" name="province_id" ref="w_combox_city" refUrl="<?php echo site_url('backend/areas/searchAreas')?>&parent={value}">
						<option value="">省市</option>
						<?php foreach ($list as $v):?>
						<option value="<?php echo $v[0]?>"><?php echo $v[1]?></option>
						<?php endforeach;?>
					</select>
					<select class="combox" name="city_id" id="w_combox_city" ref="w_combox_district" refUrl="<?php echo site_url('backend/areas/searchAreas')?>&parent={value}">
						<option value="">城市</option>
					</select>
					<select class="combox" name="district_id" id="w_combox_district">
						<option value="">区县</option>
					</select>
				</li>
				<li><a class="btnSelect" href="javascript:$.bringBack({id:'', districtName:'', cityName:''})" title="空值带回">选择</a></li>
			</ul>
			<div class="subBar right">
				<ul>
					<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<table class="table" width="100%" layoutH="138" targetType="dialog">
		<thead>
			<tr>
				<th orderField="id" class="<?php echo $order_by ?>">ID</th>
				<th>启用地区</th>
				<th>所属市区</th>
				<th>状态</th>
				<th>创建时间</th>
				<th>查找带回</th>
			</tr>
		</thead>
		<tbody>
			<?php foreach ($data as $al): ?>
				<tr target="sid_user" rel="<?php echo $al['id'] ?>">
					<td><?php echo $al['id'] ?></td>
					<td><?php echo $al['address'] ?></td>
					<td><?php echo $al['description'] ?></td>
					<td><?php if ($al['status'] == 10): ?>启用<?php else: ?>禁用<?php endif; ?></td>
					<td><?php echo date('Y-m-d H:i:s', $al['created_at']) ?></td>
					<td>
						<a class="btnSelect" href="javascript:$.bringBack({id:'<?php echo $al['id']?>', districtName:'<?php echo $al['description'] . '----' . $al['address'];?>', cityName:'<?php echo $al['description'] . '----' . $al['address'];?>'})" title="查找带回">选择</a>
					</td>
				</tr>
			<?php endforeach; ?>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="dwzPageBreak({targetType:'dialog', numPerPage:this.value})">
				<?php echo $this->html_helper->select(array('20'=>'20'), $limit)?>
			</select>
			<span>条，共<?php echo $totalCount?>条</span>
		</div>

		<div class="pagination" targetType="navTab" totalCount="<?php echo $totalCount?>" numPerPage="<?php echo $limit?>" pageNumShown="10" currentPage="<?php echo $pageNum?>"></div>

	</div>
</div>